<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>成绩管理系统</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.css" rel="stylesheet">
    <style>
        .container {
            margin-top: 20px;
        }
        .table-container {
            margin: 20px 0;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 5px;
        }
        .btn-group {
            margin: 10px 0;
        }
    </style>
</head>
<body>
    <div class="container">
        <h2>成绩管理系统</h2>
        <div class="btn-group">
            <button id="addTable" class="btn btn-primary">新增班级表格</button>
            <button id="saveData" class="btn btn-success">保存所有数据</button>
        </div>
        <div id="tables-container"></div>
    </div>

    <div class="modal fade" id="subjectModal" tabindex="-1">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title">添加考试成绩列</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
                </div>
                <div class="modal-body">
                    <div class="mb-3">
                        <label for="subjectName" class="form-label">学科名称</label>
                        <input type="text" class="form-control" id="subjectName">
                    </div>
                    <div class="mb-3">
                        <label for="examDate" class="form-label">考试日期</label>
                        <input type="date" class="form-control" id="examDate">
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" id="confirmAddSubject">确定</button>
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.js"></script>
    <script src="js/grades.js"></script>
</body>
</html>
